const requset = require("../service/requset");

/**
 *[getGroupInfo 获取某个用户/团队的知识库列表]
 *
 * @param   {[type]}  loginOrId  [loginOrId description]
 *
 * @return  {[type]}             [return description]
 */
function getReposInfo(loginOrId, type) {
  return requset({
    method: "get",
    url: `/users/${loginOrId}/repos `,
    params: {
      type,
    }
  });
}
/**
 *[getGroupInfo 获取知识库详情]
 *
 * @param   {[type]}  namespaceOrId  
 *
 * @return  {[type]}             [return description]
 */
function getReposDetails(namespaceOrId, type) {
  return requset({
    method: "get",
    url: `/repos/${namespaceOrId}`,
    params: {
      type
    }
  });
}

module.exports = {
  getReposInfo,
  getReposDetails
}